{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Audio Decoder in DALI\n",
    "\n",
    "This tutorial presents, how to set up a simple pipeline, that loads and decodes audio data using DALI. We will use a simple example from Speech Commands Data Set. While this dataset consists of samples in .wav format, the following procedure can be used for most well-known digital audio coding formats, including WAV, FLAC, and OGG (both OGG Vorbis and OGG Opus)..\n",
    "\n",
    "## Step-by-Step Guide\n",
    "1. Let's start by importing DALI and a handful of utils."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "from nvidia.dali import pipeline_def\n",
    "import nvidia.dali.fn as fn\n",
    "import nvidia.dali.types as types\n",
    "import matplotlib.pyplot as plt\n",
    "import numpy as np\n",
    "\n",
    "batch_size = 1\n",
    "audio_files = \"../data/audio\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "used `batch_size` is `1`, to keep things simple.\n",
    "\n",
    "2. Next, let's implement the pipeline. Firstly, we need to load data from disk (or any other source). [readers.file](../../operations/nvidia.dali.fn.readers.file.html) is able to load data, as well as it's labels. For more information, refer to the documentation. Furthermore, similarly to image data, you can use other reader operators that are specific for a given dataset or a dataset format (see [readers.caffe](../../operations/nvidia.dali.fn.readers.caffe.html)). After loading the input data, the pipeline decodes the audio data. As stated above, the [decoders.audio](../../operations/nvidia.dali.fn.decoders.audio.html) operator is able to decode most of the well-known audio formats.\n",
    "   \n",
    "   Note: Please remember that you shall pass proper data type (argument `dtype`) to the operator. Supported data types can be found in the documentation. If you have 24-bit audio data and you set `dtype=INT16`, it will result in loosing some information from the samples. The default `dtype` for this operator is `INT16`"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "@pipeline_def\n",
    "def audio_decoder_pipe():\n",
    "    encoded, _ = fn.readers.file(file_root=audio_files)\n",
    "    audio, sr = fn.decoders.audio(encoded, dtype=types.INT16)\n",
    "    return audio, sr"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "3. Now let's just build and run the pipeline."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "pipe = audio_decoder_pipe(batch_size=batch_size, num_threads=1, device_id=0)\n",
    "pipe.build()\n",
    "cpu_output = pipe.run()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Outputs from [decoders.audio](../../operations/nvidia.dali.fn.decoders.audio.html) consist of a tensor with the decoded data, as well as some metadata (e.g. sampling rate). To access them just check another output. On top of that, `decoders.audio` returns data in interleaved format, so we need to reshape the output tensor, to properly display it. Here's how to do that:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Sampling rate: 16000.0 [Hz]\n",
      "Audio data: [[  -5]\n",
      " [ -95]\n",
      " [-156]\n",
      " ...\n",
      " [ 116]\n",
      " [ 102]\n",
      " [  82]]\n",
      "Audio data flattened: [  -5  -95 -156 ...  116  102   82]\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYwAAAD4CAYAAAD//dEpAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAgAElEQVR4nO3dd3gc5bn38e9tyZZ7l41xQe5gAy4I02yqwcYkMSSE2OQQaggEkvCGwDHlJJwQQgkJLZQ4lDg5JHSCQ7dNr7ZMccNFtmVs4SL3rvq8f+xImpV3pdVqZ1cr/T7XtTD7zOzMrZE19z5l5jHnHCIiInVpkeoAREQkPShhiIhITJQwREQkJkoYIiISEyUMERGJSWaqAwhK9+7dXU5OTqrDEBFJK/Pnz9/snMuOtK7JJoycnBzy8vJSHYaISFoxszXR1qlJSkREYq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98L2FRHfImO+wTgO2ZWADxFqFnqPrxZESMco+r4Fj4rYqLjWgesc8596r1/jlACSfX5Gg+sds4VOedKgRcIncNUny+/RJ2jQm85YTGa2UXAt4AfesksnriqZu1MQFwDCSX/L72/gT7AZ2Z2UBxxJfp8rQNecCFzCbUAdI8jrvjOVzzto031RSh7ryL0j6Wyg2h4gMcz4O/AvTXK/0B4B+Vd3vJZhHe4zfXKuxJq2+/ivVYDXRMU48lUd3o/S3gn2U+95asI78R9xlseTnhH3Coa3un9PjDUW77FO1cpPV/AMcBioK13rBnAz1J5vjiw7Tth54gDO3EnNSCuiYQmWsuusV3Ec0Etf6PRznc8cdVYV0B1H0aqz9cVwG+95SGEmpssWecrkAthOr8IjYJYTmhkwU0BH2ssoaaBBcAX3msSofbFOcAKQiMiKv/hGfCgF9tCINe3r0uAfO91cQJjPJnqhDHA+8ef7/1jqxyp0dp7n++tH+D7/E1evMuIcXRIHfGMBPK8c/Zv748z5ecL+F9gKbAI+If3h5uS8wX8i1BfSimhb6SXJvIcAbnez7kS+DM1BiHUM658Qhe9yn//j9R1LojyNxrtfMcTV431BVQnjFSfr1bA/3n7+ww4NZnnS48GERGRmKgPQ0REYqKEISIiMVHCEBGRmChhiIhITJQwREQkJkoYIiISEyUMERGJyf8H9KbXBbRR3j4AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "audio_data = cpu_output[0].at(0)\n",
    "sampling_rate = cpu_output[1].at(0)\n",
    "print(\"Sampling rate:\", sampling_rate, \"[Hz]\")\n",
    "print(\"Audio data:\", audio_data)\n",
    "audio_data = audio_data.flatten()\n",
    "print(\"Audio data flattened:\", audio_data)\n",
    "plt.plot(audio_data)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Verification\n",
    "\n",
    "Let's verify, that the decoders.Audio actually works. The presented method can also come in handy for debugging DALI pipeline, in case something doesn't go as planned. \n",
    "\n",
    "We will use external tool to decode used data and compare the results against data decoded by DALI.\n",
    "\n",
    "### Important!\n",
    "\n",
    "Following snippet installs the external dependency (`simpleaudio`). In case you already have it, or don't want to install it, you might want to stop here and not run this one."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import sys\n",
    "\n",
    "!{sys.executable} -m pip install simpleaudio"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Below is the side-by-side comparision of decoded data. If you have the `simpleaudio` module installed, you can run the snippet and see it for yourself."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "src: simpleaudio\n",
      "shape:  (16000,)\n",
      "data:  [  -5  -95 -156 ...  116  102   82]\n",
      "\n",
      "\n",
      "src: DALI\n",
      "shape:  (16000,)\n",
      "data:  [  -5  -95 -156 ...  116  102   82]\n",
      "\n",
      "Are the arrays equal? YES\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAY8AAAD8CAYAAACPWyg8AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAIABJREFUeJzt3Xl4VdW5x/HvSwJRkBlECCAgoEyKmOKEWhVBoBWxXsX2qq3eoq100NYWte21VZTawdY6FS116ADWoXALgqA4iwwKMsgQkCkyySxTSLLuH2cnniQnw0n2PvsMv8/znCf7rD2cN7BO3r32Xnstc84hIiISjwZhByAiIqlHyUNEROKm5CEiInFT8hARkbgpeYiISNyUPEREJG5KHiIiEjclDxERiZuSh4iIxC077ACC0qZNG9elS5eww5A0tWjRos+cc23D+GzVbQlSbet22iaPLl26sHDhwrDD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Hof3BVSDN2I9HhYAiwvjYPINchXgTXAHKCVV27AI17MS4G8qGPdQOTGWD7wLR9j/CeRJvFRItdCb/QzPiDPq/RrgYfxHlb1MdZnvVg+8r5U7aO2v8v73FVE9Yapqm54/1/zvd/hX0BO2PVYdTv963Uq1G09YS4iInHLpMtWIiLiEyUPERGJm5KHiIjETclDRETipuQhIiJxU/IQEZG4KXmIiEjclDxERCRu/w8q6tQDB/3VIAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 2 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "import simpleaudio as sa\n",
    "\n",
    "wav = sa.WaveObject.from_wave_file(\"../data/audio/wav/three.wav\")\n",
    "three_audio = np.frombuffer(wav.audio_data, dtype=np.int16)\n",
    "\n",
    "print(\"src: simpleaudio\")\n",
    "print(\"shape: \", three_audio.shape)\n",
    "print(\"data: \", three_audio)\n",
    "print(\"\\n\")\n",
    "print(\"src: DALI\")\n",
    "print(\"shape: \", audio_data.shape)\n",
    "print(\"data: \", audio_data)\n",
    "print(\n",
    "    \"\\nAre the arrays equal?\",\n",
    "    \"YES\" if np.all(audio_data == three_audio) else \"NO\",\n",
    ")\n",
    "\n",
    "fig, ax = plt.subplots(1, 2)\n",
    "ax[0].plot(three_audio)\n",
    "ax[1].plot(audio_data)\n",
    "plt.show()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
